Skip to content

ci: publish released MWS images to GHCR - #137

Closed
linonetwo wants to merge 1 commit into
TiddlyWiki:mainfrom
linonetwo:ci/publish-npm-releases
Closed

ci: publish released MWS images to GHCR#137
linonetwo wants to merge 1 commit into
TiddlyWiki:mainfrom
linonetwo:ci/publish-npm-releases

Conversation

@linonetwo

Copy link
Copy Markdown

Replaces #134 with a release-based container workflow.

This does not build production images from main and does not install @latest:

  • The Dockerfile now matches npm init @tiddlywiki/mws: it uses the 0.2.0 instance-data format, installs one exact published @tiddlywiki/mws version, and runs mws update-tiddlywiki while building the image.
  • Native build tools are available only while npm install runs, so an Alpine build can compile a dependency when a prebuilt binary is unavailable.
  • Pull requests build the image but cannot publish it.
  • A published GitHub Release builds the tag named by that release after verifying the corresponding MWS version is already available on npm. A manual fallback accepts an explicit published npm version.
  • Published images receive only an immutable MWS version tag, for example ghcr.io/tiddlywiki/multiwikiserver:0.2.4; the workflow deliberately does not publish main or latest.

The existing Docker Compose volume contract is unchanged: only /data/store is mounted. This PR does not impose my Kubernetes-specific full-/data layout.

Copilot AI lite review requested due to automatic review settings August 20, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the container build and CI/CD so MultiWikiServer images are produced from published releases (or a manual dispatch) and pushed to GHCR with only an immutable @tiddlywiki/mws version tag (no main/latest).

Changes:

  • Docker image now installs a single exact @tiddlywiki/mws version (via MWS_VERSION build arg) and runs mws update-tiddlywiki at build time, matching the npm init @tiddlywiki/mws instance template.
  • Adds a GitHub Actions workflow that builds on PRs (no publish) and publishes on GitHub Release published events (or manual dispatch) after verifying the npm version exists.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Dockerfile Pins the installed @tiddlywiki/mws version via build arg, aligns instance-data format with the template, and runs mws update-tiddlywiki during image build.
.github/workflows/publish-container.yml Introduces PR build + release/manual publish workflow to GHCR using an immutable version tag.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +51 to +55
- name: Check out release source
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.sha }}

@Arlen22

Arlen22 commented Sep 2, 2026

Copy link
Copy Markdown
Member

I'm creating my own GitHub workflow and Dockerfile based on the discussions here and in #129. Please refer to that issue for further updates.

@Arlen22 Arlen22 closed this Sep 2, 2026
@linonetwo

Copy link
Copy Markdown
Author

Okay, looking forward to it. Just remember, don't mix app code and data in the base image.

NodeBB image, as an example, have this problem, and will become a real mess to manage, when upgrading its base image, all installed plugins and plugin config will be lost, because they reside in node_modules. And It requires building the dist file from node_modules, cause the image cannot be used out of the box, needs to manually run the build command. Anyway, very annoying. I hope it won't happen here.

@Arlen22

Arlen22 commented Sep 2, 2026

Copy link
Copy Markdown
Member

MWS can already be global installed (npm i @tiddlywiki/mws -g) so that's basically all the image does. If code and data aren't separate it's a bug so feel free to report it.

Plugins are an interesting case. MWS doesn't have plugins currently, but I'll keep that in mind if I ever do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants